package com.crm.service.workOrderManager;

import com.crm.model.entity.workOrderManager.WorkOrder;
import com.crm.model.entity.workOrderManager.WorkOrderCreditDeductRecord;
import com.crm.model.entity.workOrderManager.WorkOrderReply;
import com.crm.model.qo.workOrderManager.WorkOrderQO;
import com.crm.model.vo.workOrderManager.WorkOrderReplyVO;
import com.crm.model.vo.workOrderManager.WorkOrderVO;

import java.util.List;

/**
 * @Author baijian
 * @Date 2021/05/18 15:18 下午
 */
public interface WorkOrderDbService {

    /**
     * 管理模块 -- 工单管理列表
     * @param workOrderQO 工单号
     * @param order 排序
     * @param dateUnit 1本周 2本月 3本年
     * @return
     */
    List<WorkOrderVO> workOrderList(WorkOrderQO workOrderQO, String order, Integer dateUnit);

    /**
     * 工单管理-新增工单
     * @param workOrder 工单实体类
     * @return
     */
    Boolean addWorkOrder(WorkOrder workOrder);

    /**
     * 工单管理-工单列表-回复工单
     * @param workOrderReply 工单实体类
     * @return
     */
    Boolean addWorkOrderReply(WorkOrderReply workOrderReply);

    /**
     * 工单管理-工单列表-回复工单列表
     * @param workOrderId 工单id
     * @return
     */
    List<WorkOrderReplyVO> workOrderReplyList(String workOrderId);

    /**
     * 用户端-工单管理-工单详情
     * @param workOrderId 工单id
     * @return
     */
    WorkOrder getWorkOrderById(String workOrderId);

    /**
     * 修改工单
     * @Author renshaorong
     * @Date 2021/7/20
     * @param workOrder
     * @return
     */
    boolean updateByPrimaryKeySelective(WorkOrder workOrder);

    /**
     * 新增信用值记录表
     * @param workOrderCreditDeductRecord 信用记录
     */
    boolean addWorkOrderCreditDeductRecord(WorkOrderCreditDeductRecord workOrderCreditDeductRecord);
}
